conformance: measure the dark-factory arrangement per repo - #390
Merged
Conversation
Step 4 of .github-private#913. Steps 1-3 put the pieces in place on 37
repos; the epic asserted the arrangement, the standard now measures it.
Per row, dark_factory: required_checks (the required_status_checks contexts
on the default branch, from GET /repos/{r}/rules/branches/{default} — public
on a public repo, so the lane's own token reads it; a failed read is a gap
with its status, never an empty gate), arming_lane (auto-merge.yml present
on the default branch), legacy_arming (dependabot-auto-merge.yml, while it
exists), and gate_ready — standard / test AND pr-claim / pr-claim required
AND the arming lane present. allow_auto_merge is deliberately not read: GitHub
returns it only to an admin-rights caller and this lane mints nothing; it is
declared and applied in infra github-admin/repositories.tf.
Two findings, the repo's: gate-absent (a caller whose contexts nothing on
the default branch requires — green decides nothing) and arming-lane-absent
(gated, and nothing arms the merge — green waits for a person). Totals gain
gated / arming_lane / gate_ready; the summary and the reader print them.
Closes #389
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAE3i1NCfwwSVYScKWvEdd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #389 —
.github-private#913 step 4. Steps 1–3 put the pieces in place on 37 repos; the epic asserted the arrangement, the standard now measures it.What each row gains
dark_factory, read with the lane's own token:required_checksGET /repos/{r}/rules/branches/{default}→required_status_checkscontextsrules-unreadable:<status>), never an empty gaterulesetsarming_laneauto-merge.ymlon the default branch, elsenulllegacy_armingdependabot-auto-merge.ymlpresentgate_readystandard / testandpr-claim / pr-claimrequired and arming lane presentallow_auto_mergeis deliberately absent: GitHub returns it only to an admin-rights caller and this lane mints nothing. It is declared and applied in infragithub-admin/repositories.tf; the row does not guess.Two new findings (the repo's, not the lane's)
gate-absent— a caller whose contexts nothing on the default branch requires: green decides nothing (the fail-open case #913 names).arming-lane-absent— something is required, and nothing arms the merge: green waits for a person. A legacy armer does not count.Totals gain
gated / arming_lane / gate_ready; the summary table and the reader print them.rulesnot passed toclassifyRepo(the unit surface) yieldsdark_factory: nullrather than a default that reads as ungated.Expected on the first run
37
gate_ready. Callers outside the 37 land ingate-absent(the step-1 rollout's remaining denominator, stated by the instrument) or, where a repo has its own gate,arming-lane-absent..githubitself: gated onschema, no arming lane →arming-lane-absent, which is true.Tests: 31 pass (was 26) —
readRules, fourclassifyRepocases, totals and summary row; the sweep's fake GitHub serves branch rules. Reader and ratchet suites unchanged and green. desk's Repo health copy for the two new findings is a follow-up PR there.🤖 Generated with Claude Code
https://claude.ai/code/session_01CAE3i1NCfwwSVYScKWvEdd
Generated by Claude Code